package net.googlecode.kharchenko.models;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.GenerationType;
import java.io.Serializable;
import java.sql.Date;

/**
 * Represents an object in database. Contains some piece of information.
 *
 * @author Kharchenko Yaroslav
 */
@Entity
@Table(name = "info")
public class InfPortion implements Serializable {


    public InfPortion() {

    }

    public InfPortion(Long id, String text, Date date, String author) {
        this.id = id;
        this.text = text;
        this.date = date;
        this.author = author;
    }


    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    private Long id;

    private String text;

    private Date date;

    private String author;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }


}
